You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the contribution and for the persistence (3rd attempt!). The concept is valid — buying Stars via Fragment with TON payments is genuinely useful and doesn't duplicate what sdk.telegram already provides.
However, there are critical security issues that block this PR:
Security — must fix
Hardcoded API token — fragment_api_token: "paperno" is checked into the public repo (line 88). Default should be "" or null, with sdk.secrets.require("fragment_api_token") for runtime resolution.
Plaintext HTTP to unknown server — http://72.56.122.187:8000/api/v1/stars is an unaudited third-party IP with no TLS. The plugin sends the agent's TON wallet address and payment data over cleartext. This is a MITM vector and a fund theft risk. At minimum:
The endpoint must be HTTPS
The server/service needs to be identified and documented (who runs it? what's the trust model?)
Default should be empty string with explicit error, not a hardcoded IP
SDK compliance — must fix
Missing scope: "dm-only" on both tools — they trigger TON payments, must be DM-only per project conventions.
Missing secrets in manifest — fragment_api_token must be declared in manifest.json so the webui prompts users on install:
"secrets": {
"fragment_api_token": { "required": true, "description": "Fragment API token for Stars purchases" }
}
Error anti-pattern — several branches return { success: true, data: { status: "error", message: "..." } }. Errors must always be { success: false, error: "..." }.
Minor
Leading space in manifest name: " Telegram Stars Purchase" → "Telegram Stars Purchase"
Branch hygiene: please submit from a feature branch, not main
Happy to re-review once the security issues are addressed. The core logic (DB schema, order polling, payment flow) is solid — it just needs a trustworthy and secure transport layer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agents earn a commission on buying stars from fragment.com and generate income. No KYC. No Hassle.